Optimal. Leaf size=91 \[ \frac {24 d^4 \sin (a+b x)}{b^5}-\frac {24 d^3 (c+d x) \cos (a+b x)}{b^4}-\frac {12 d^2 (c+d x)^2 \sin (a+b x)}{b^3}+\frac {4 d (c+d x)^3 \cos (a+b x)}{b^2}+\frac {(c+d x)^4 \sin (a+b x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 2, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3296, 2637} \[ -\frac {12 d^2 (c+d x)^2 \sin (a+b x)}{b^3}-\frac {24 d^3 (c+d x) \cos (a+b x)}{b^4}+\frac {4 d (c+d x)^3 \cos (a+b x)}{b^2}+\frac {24 d^4 \sin (a+b x)}{b^5}+\frac {(c+d x)^4 \sin (a+b x)}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2637
Rule 3296
Rubi steps
\begin {align*} \int (c+d x)^4 \cos (a+b x) \, dx &=\frac {(c+d x)^4 \sin (a+b x)}{b}-\frac {(4 d) \int (c+d x)^3 \sin (a+b x) \, dx}{b}\\ &=\frac {4 d (c+d x)^3 \cos (a+b x)}{b^2}+\frac {(c+d x)^4 \sin (a+b x)}{b}-\frac {\left (12 d^2\right ) \int (c+d x)^2 \cos (a+b x) \, dx}{b^2}\\ &=\frac {4 d (c+d x)^3 \cos (a+b x)}{b^2}-\frac {12 d^2 (c+d x)^2 \sin (a+b x)}{b^3}+\frac {(c+d x)^4 \sin (a+b x)}{b}+\frac {\left (24 d^3\right ) \int (c+d x) \sin (a+b x) \, dx}{b^3}\\ &=-\frac {24 d^3 (c+d x) \cos (a+b x)}{b^4}+\frac {4 d (c+d x)^3 \cos (a+b x)}{b^2}-\frac {12 d^2 (c+d x)^2 \sin (a+b x)}{b^3}+\frac {(c+d x)^4 \sin (a+b x)}{b}+\frac {\left (24 d^4\right ) \int \cos (a+b x) \, dx}{b^4}\\ &=-\frac {24 d^3 (c+d x) \cos (a+b x)}{b^4}+\frac {4 d (c+d x)^3 \cos (a+b x)}{b^2}+\frac {24 d^4 \sin (a+b x)}{b^5}-\frac {12 d^2 (c+d x)^2 \sin (a+b x)}{b^3}+\frac {(c+d x)^4 \sin (a+b x)}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.35, size = 76, normalized size = 0.84 \[ \frac {4 b d (c+d x) \cos (a+b x) \left (b^2 (c+d x)^2-6 d^2\right )+\sin (a+b x) \left (b^4 (c+d x)^4-12 b^2 d^2 (c+d x)^2+24 d^4\right )}{b^5} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.76, size = 169, normalized size = 1.86 \[ \frac {4 \, {\left (b^{3} d^{4} x^{3} + 3 \, b^{3} c d^{3} x^{2} + b^{3} c^{3} d - 6 \, b c d^{3} + 3 \, {\left (b^{3} c^{2} d^{2} - 2 \, b d^{4}\right )} x\right )} \cos \left (b x + a\right ) + {\left (b^{4} d^{4} x^{4} + 4 \, b^{4} c d^{3} x^{3} + b^{4} c^{4} - 12 \, b^{2} c^{2} d^{2} + 24 \, d^{4} + 6 \, {\left (b^{4} c^{2} d^{2} - 2 \, b^{2} d^{4}\right )} x^{2} + 4 \, {\left (b^{4} c^{3} d - 6 \, b^{2} c d^{3}\right )} x\right )} \sin \left (b x + a\right )}{b^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.40, size = 170, normalized size = 1.87 \[ \frac {4 \, {\left (b^{3} d^{4} x^{3} + 3 \, b^{3} c d^{3} x^{2} + 3 \, b^{3} c^{2} d^{2} x + b^{3} c^{3} d - 6 \, b d^{4} x - 6 \, b c d^{3}\right )} \cos \left (b x + a\right )}{b^{5}} + \frac {{\left (b^{4} d^{4} x^{4} + 4 \, b^{4} c d^{3} x^{3} + 6 \, b^{4} c^{2} d^{2} x^{2} + 4 \, b^{4} c^{3} d x + b^{4} c^{4} - 12 \, b^{2} d^{4} x^{2} - 24 \, b^{2} c d^{3} x - 12 \, b^{2} c^{2} d^{2} + 24 \, d^{4}\right )} \sin \left (b x + a\right )}{b^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 539, normalized size = 5.92 \[ \frac {\frac {d^{4} \left (\left (b x +a \right )^{4} \sin \left (b x +a \right )+4 \left (b x +a \right )^{3} \cos \left (b x +a \right )-12 \left (b x +a \right )^{2} \sin \left (b x +a \right )+24 \sin \left (b x +a \right )-24 \left (b x +a \right ) \cos \left (b x +a \right )\right )}{b^{4}}-\frac {4 a \,d^{4} \left (\left (b x +a \right )^{3} \sin \left (b x +a \right )+3 \left (b x +a \right )^{2} \cos \left (b x +a \right )-6 \cos \left (b x +a \right )-6 \left (b x +a \right ) \sin \left (b x +a \right )\right )}{b^{4}}+\frac {4 c \,d^{3} \left (\left (b x +a \right )^{3} \sin \left (b x +a \right )+3 \left (b x +a \right )^{2} \cos \left (b x +a \right )-6 \cos \left (b x +a \right )-6 \left (b x +a \right ) \sin \left (b x +a \right )\right )}{b^{3}}+\frac {6 a^{2} d^{4} \left (\left (b x +a \right )^{2} \sin \left (b x +a \right )-2 \sin \left (b x +a \right )+2 \left (b x +a \right ) \cos \left (b x +a \right )\right )}{b^{4}}-\frac {12 a c \,d^{3} \left (\left (b x +a \right )^{2} \sin \left (b x +a \right )-2 \sin \left (b x +a \right )+2 \left (b x +a \right ) \cos \left (b x +a \right )\right )}{b^{3}}+\frac {6 c^{2} d^{2} \left (\left (b x +a \right )^{2} \sin \left (b x +a \right )-2 \sin \left (b x +a \right )+2 \left (b x +a \right ) \cos \left (b x +a \right )\right )}{b^{2}}-\frac {4 a^{3} d^{4} \left (\cos \left (b x +a \right )+\left (b x +a \right ) \sin \left (b x +a \right )\right )}{b^{4}}+\frac {12 a^{2} c \,d^{3} \left (\cos \left (b x +a \right )+\left (b x +a \right ) \sin \left (b x +a \right )\right )}{b^{3}}-\frac {12 a \,c^{2} d^{2} \left (\cos \left (b x +a \right )+\left (b x +a \right ) \sin \left (b x +a \right )\right )}{b^{2}}+\frac {4 c^{3} d \left (\cos \left (b x +a \right )+\left (b x +a \right ) \sin \left (b x +a \right )\right )}{b}+\frac {a^{4} d^{4} \sin \left (b x +a \right )}{b^{4}}-\frac {4 a^{3} c \,d^{3} \sin \left (b x +a \right )}{b^{3}}+\frac {6 a^{2} c^{2} d^{2} \sin \left (b x +a \right )}{b^{2}}-\frac {4 a \,c^{3} d \sin \left (b x +a \right )}{b}+c^{4} \sin \left (b x +a \right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.80, size = 481, normalized size = 5.29 \[ \frac {c^{4} \sin \left (b x + a\right ) - \frac {4 \, a c^{3} d \sin \left (b x + a\right )}{b} + \frac {6 \, a^{2} c^{2} d^{2} \sin \left (b x + a\right )}{b^{2}} - \frac {4 \, a^{3} c d^{3} \sin \left (b x + a\right )}{b^{3}} + \frac {a^{4} d^{4} \sin \left (b x + a\right )}{b^{4}} + \frac {4 \, {\left ({\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (b x + a\right )\right )} c^{3} d}{b} - \frac {12 \, {\left ({\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (b x + a\right )\right )} a c^{2} d^{2}}{b^{2}} + \frac {12 \, {\left ({\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (b x + a\right )\right )} a^{2} c d^{3}}{b^{3}} - \frac {4 \, {\left ({\left (b x + a\right )} \sin \left (b x + a\right ) + \cos \left (b x + a\right )\right )} a^{3} d^{4}}{b^{4}} + \frac {6 \, {\left (2 \, {\left (b x + a\right )} \cos \left (b x + a\right ) + {\left ({\left (b x + a\right )}^{2} - 2\right )} \sin \left (b x + a\right )\right )} c^{2} d^{2}}{b^{2}} - \frac {12 \, {\left (2 \, {\left (b x + a\right )} \cos \left (b x + a\right ) + {\left ({\left (b x + a\right )}^{2} - 2\right )} \sin \left (b x + a\right )\right )} a c d^{3}}{b^{3}} + \frac {6 \, {\left (2 \, {\left (b x + a\right )} \cos \left (b x + a\right ) + {\left ({\left (b x + a\right )}^{2} - 2\right )} \sin \left (b x + a\right )\right )} a^{2} d^{4}}{b^{4}} + \frac {4 \, {\left (3 \, {\left ({\left (b x + a\right )}^{2} - 2\right )} \cos \left (b x + a\right ) + {\left ({\left (b x + a\right )}^{3} - 6 \, b x - 6 \, a\right )} \sin \left (b x + a\right )\right )} c d^{3}}{b^{3}} - \frac {4 \, {\left (3 \, {\left ({\left (b x + a\right )}^{2} - 2\right )} \cos \left (b x + a\right ) + {\left ({\left (b x + a\right )}^{3} - 6 \, b x - 6 \, a\right )} \sin \left (b x + a\right )\right )} a d^{4}}{b^{4}} + \frac {{\left (4 \, {\left ({\left (b x + a\right )}^{3} - 6 \, b x - 6 \, a\right )} \cos \left (b x + a\right ) + {\left ({\left (b x + a\right )}^{4} - 12 \, {\left (b x + a\right )}^{2} + 24\right )} \sin \left (b x + a\right )\right )} d^{4}}{b^{4}}}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.42, size = 219, normalized size = 2.41 \[ \frac {\sin \left (a+b\,x\right )\,\left (b^4\,c^4-12\,b^2\,c^2\,d^2+24\,d^4\right )}{b^5}-\frac {4\,\cos \left (a+b\,x\right )\,\left (6\,c\,d^3-b^2\,c^3\,d\right )}{b^4}+\frac {4\,d^4\,x^3\,\cos \left (a+b\,x\right )}{b^2}-\frac {12\,x\,\cos \left (a+b\,x\right )\,\left (2\,d^4-b^2\,c^2\,d^2\right )}{b^4}+\frac {d^4\,x^4\,\sin \left (a+b\,x\right )}{b}-\frac {4\,x\,\sin \left (a+b\,x\right )\,\left (6\,c\,d^3-b^2\,c^3\,d\right )}{b^3}-\frac {6\,x^2\,\sin \left (a+b\,x\right )\,\left (2\,d^4-b^2\,c^2\,d^2\right )}{b^3}+\frac {12\,c\,d^3\,x^2\,\cos \left (a+b\,x\right )}{b^2}+\frac {4\,c\,d^3\,x^3\,\sin \left (a+b\,x\right )}{b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 2.55, size = 311, normalized size = 3.42 \[ \begin {cases} \frac {c^{4} \sin {\left (a + b x \right )}}{b} + \frac {4 c^{3} d x \sin {\left (a + b x \right )}}{b} + \frac {6 c^{2} d^{2} x^{2} \sin {\left (a + b x \right )}}{b} + \frac {4 c d^{3} x^{3} \sin {\left (a + b x \right )}}{b} + \frac {d^{4} x^{4} \sin {\left (a + b x \right )}}{b} + \frac {4 c^{3} d \cos {\left (a + b x \right )}}{b^{2}} + \frac {12 c^{2} d^{2} x \cos {\left (a + b x \right )}}{b^{2}} + \frac {12 c d^{3} x^{2} \cos {\left (a + b x \right )}}{b^{2}} + \frac {4 d^{4} x^{3} \cos {\left (a + b x \right )}}{b^{2}} - \frac {12 c^{2} d^{2} \sin {\left (a + b x \right )}}{b^{3}} - \frac {24 c d^{3} x \sin {\left (a + b x \right )}}{b^{3}} - \frac {12 d^{4} x^{2} \sin {\left (a + b x \right )}}{b^{3}} - \frac {24 c d^{3} \cos {\left (a + b x \right )}}{b^{4}} - \frac {24 d^{4} x \cos {\left (a + b x \right )}}{b^{4}} + \frac {24 d^{4} \sin {\left (a + b x \right )}}{b^{5}} & \text {for}\: b \neq 0 \\\left (c^{4} x + 2 c^{3} d x^{2} + 2 c^{2} d^{2} x^{3} + c d^{3} x^{4} + \frac {d^{4} x^{5}}{5}\right ) \cos {\relax (a )} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________